import { createReactive } from '../../neo'

const template = `
<ul class="list">
    <h1>{{ title }}</h1>
    {{ dateTime }}
    <for data="list" tag="li" class="item">
        <span>姓名：{ name }</span>
        <span>年龄 { age }</span>
    </for>
</ul>`;

function TestA() {
    const state = createReactive({
        title: '学生信息列表',
        dateTime: '2021-02-03 15:33',
        list: [
            {
                id: 1,
                name: '张世伟',
                age: 16
            },
            {
                id: 2,
                name: '李四',
                age: 12
            },
            {
                id: 3,
                name: '王无',
                age: 45
            },
        ]
    });
    return [template, state];
}

export default TestA;